var Koa=require("koa");
var router=require("koa-router")();
var views=require("koa-views");
var nunjucks=require("nunjucks");
var app=new Koa();
app.listen("3000",()=>{
    console.log("成功");
})
app.use(views(__dirname+"/html/模板继承",{
    map:{html:"nunjucks"}
}))
router.get("/",async ctx=>{
    await ctx.render("index",{
        title:"首页"
    })
})
router.get("/130",async ctx=>{7
    var array=[1,2,3,4,5]
    await ctx.render("images",{
        num:true,
        array
    })
})
router.get("/140",async ctx=>{
    await ctx.render("index",{
        title:"文字"
    })
})
app.use(router.routes());
